
package com.gao.service;
import com.gao.IService.IConsultationService;
import com.gao.entity.Consultation;
import com.gao.mapper.ConsultationMapper;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ConsultationService extends ServiceImpl<ConsultationMapper, Consultation> implements IConsultationService {
    @Autowired
    private ConsultationMapper consultationMapper;

    public List<Consultation> selectAllWithRelations() {
        return consultationMapper.selectAllWithRelations();
    }

    public Page<Consultation> paginate(Integer pageNumber, Integer pageSize) {
        return consultationMapper.paginate(pageNumber, pageSize, new QueryWrapper());
    }
}

